package atomic;


/**
 * @author: cuiyutian1
 * @date: 2021/9/22 11:01
 * @description: 报单资质映射的枚举
 */
public enum QualificationMapEnum {

    /**
     * 公益类-办学许可证
     */
    RUN_SCHOOL_Qualification("514", "RUN_SCHOOL_LICENSE_PIC","UTILITIES_EXPENSE", "公益类-办学许可证"),

    /**
     * 普通类-营业执照
     */
    DEFAULT_Qualification("528", "BUSINESS_LICENSE","ENTERTAINMENT_FITNESS_SERVICES", "普通类-营业执照"),

    /**
     * 线上类-营业执照
     */
    ONLIE_Qualification("527", "BUSINESS_LICENSE","EDUCATION_TRAINING", "线上类-营业执照"),

    /**
     * 私立院校-办学许可证
     */
    EDUCATION_Qualification("512", "RUN_SCHOOL_LICENSE_PIC","EDUCATION_TRAINING", "私立院校类-营业执照"),

    /**
     * 缴费类-证明文件
     */
    EXPENSE_Qualification("513", "CERTIFICATE_FILE","UTILITIES_EXPENSE", "缴费类-证明文件")

    ;


    public static QualificationMapEnum getEnumByMccCode(String mccCode) {
        if (mccCode == null || mccCode.trim().length() == 0) {
            return null;
        }
        for (QualificationMapEnum qualificationMapEnum : QualificationMapEnum.values()) {
            if (mccCode.equals(qualificationMapEnum.getMccCode())) {
                return qualificationMapEnum;
            }
        }
        return null;
    }

    private String mccCode;
    private String qualificationType;
    private String merchantCategory;
    private String desc;

    public String getMccCode() {
        return mccCode;
    }

    public String getQualificationType() {
        return qualificationType;
    }

    public String getDesc() {
        return desc;
    }

    public String getMerchantCategory(){
        return merchantCategory;
    }

    QualificationMapEnum(String mccCode, String qualificationType, String merchantCategory, String desc) {
        this.mccCode = mccCode;
        this.qualificationType = qualificationType;
        this.merchantCategory = merchantCategory;
        this.desc = desc;
    }
}
